﻿// Copyright: 2012 
// Author: Minh Vu - YoungJ
// File name: MyBase.cs
// Solution: PhoneAppRssReader
// Project: PhoneAppRssReader
// Time: 8:37 PM 05/05/2012

using System.ComponentModel;

namespace PhoneAppRssReader.Entity
{
    public abstract class MyBase : INotifyPropertyChanged
    {

        private string error;
        public string Error
        {
            get { return error; }
            set
            {
                if (value == null) return;
                error = value;
                OnPropertyChanged("Error");
            }
        }
        #region Implementation of INotifyPropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;
        public void OnPropertyChanged(string info)
        {
            if (PropertyChanged != null && !string.IsNullOrEmpty(info))
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
        #endregion
    }
}